/**
 * CityMap.java
 * 2010-1-31
 */
package com.dlplay.flightinfo.core;

import java.util.HashMap;
import java.util.Map;

import com.dlplay.flightinfo.data.CityCode;

/**
 * @author zhao yu
 *
 */
public class CityMap {
	private static Map<String, CityCode> strMap = new HashMap<String, CityCode>();
	private static Map<CityCode, String> codeMap = new HashMap<CityCode, String>();
	private static boolean init = false;
	private static void init()
	{
		if(!init)
		{
			strMap.put("北京", CityCode.PEK);
			strMap.put("上海	", CityCode.SHA);
			strMap.put("武汉", CityCode.WUH);
			strMap.put("烟台", CityCode.YNT);
			init=true;
		}
	}
	public static CityCode getCode(String str) {
		init();
		if(strMap.containsKey(str))
			return strMap.get(str);
		else
			return CityCode.UNKNOWN;
	}
	
}
